--
-- Table structure for table `acc_creation_captcha`
--

DROP TABLE IF EXISTS `acc_creation_captcha`;
CREATE TABLE `acc_creation_captcha` (
  `id` int(11) NOT NULL auto_increment,
  `filename` varchar(200) NOT NULL default '',
  `key` varchar(200) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Table structure for table `account_extend`
--

DROP TABLE IF EXISTS `account_extend`;
CREATE TABLE `account_extend` (
  `account_id` int(11) unsigned NOT NULL,
  `character_id` int(11) unsigned default NULL,
  `character_name` varchar(12) default NULL,
  `g_id` smallint(5) unsigned NOT NULL default '2',
  `avatar` varchar(60) default NULL,
  `gender` tinyint(4) NOT NULL default '0',
  `homepage` varchar(100) default NULL,
  `icq` varchar(12) default NULL,
  `location` varchar(50) default NULL,
  `signature` text,
  `hideemail` tinyint(1) NOT NULL default '1',
  `hideprofile` tinyint(1) NOT NULL default '0',
  `theme` smallint(5) unsigned NOT NULL default '0',
  `forum_posts` int(10) unsigned NOT NULL default '0',
  `registration_ip` varchar(15) NOT NULL default '0.0.0.0',
  `activation_code` varchar(40) default NULL,
  `msn` varchar(255) default NULL,
  `secretq1` varchar(300) NOT NULL default '0',
  `secreta1` varchar(300) NOT NULL default '0',
  `secretq2` varchar(300) NOT NULL default '0',
  `secreta2` varchar(300) NOT NULL default '0',
  `vip` int(1) NOT NULL default '0',
  `donator` int(1) NOT NULL default '0',
  PRIMARY KEY  (`account_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `account_groups`
--

DROP TABLE IF EXISTS `account_groups`;
CREATE TABLE `account_groups` (
  `g_id` smallint(5) unsigned NOT NULL auto_increment,
  `g_title` varchar(32) NOT NULL,
  `g_prefix` char(6) default NULL,
  `g_is_admin` tinyint(1) default '0',
  `g_is_supadmin` tinyint(1) default '0',
  `g_use_search` tinyint(1) default '0',
  `g_view_profile` tinyint(1) default '0',
  `g_post_new_topics` tinyint(1) default '0',
  `g_reply_other_topics` tinyint(1) default '0',
  `g_use_attach` tinyint(1) default '0',
  `g_edit_own_posts` tinyint(1) default '0',
  `g_delete_own_posts` tinyint(1) default '0',
  `g_delete_own_topics` tinyint(1) default '0',
  `g_forum_moderate` tinyint(1) NOT NULL default '0',
  `g_use_pm` tinyint(1) default '0',
  `g_gal_view` tinyint(1) NOT NULL default '0',
  `g_gal_upload` tinyint(1) default '0',
  `g_gal_download` tinyint(1) default '0',
  `g_gal_moderate` tinyint(1) default '0',
  `g_gal_balanceon` tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (`g_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `account_keys`
--

DROP TABLE IF EXISTS `account_keys`;
CREATE TABLE `account_keys` (
  `id` int(11) unsigned NOT NULL,
  `key` varchar(40) character set utf8 default NULL,
  `assign_time` int(11) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Table structure for table `donations_template`
--

DROP TABLE IF EXISTS `donations_template`;
CREATE TABLE `donations_template` (
  `id` int(11) NOT NULL auto_increment,
  `donation` varchar(255) NOT NULL,
  `items` varchar(4000) NOT NULL,
  `currency` varchar(3) NOT NULL,
  `description` varchar(255) NOT NULL,
  `itemset` varchar( 1000 ) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Table structure for table `f_attachs`
--

DROP TABLE IF EXISTS `f_attachs`;
CREATE TABLE `f_attachs` (
  `attach_id` int(10) unsigned NOT NULL auto_increment,
  `attach_file` varchar(255) character set cp1251 NOT NULL,
  `attach_location` varchar(255) character set cp1251 NOT NULL,
  `attach_hits` int(10) NOT NULL default '0',
  `attach_date` int(10) NOT NULL,
  `attach_tid` int(10) unsigned NOT NULL default '0',
  `attach_member_id` int(8) unsigned NOT NULL,
  `attach_filesize` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`attach_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `f_categories`
--

DROP TABLE IF EXISTS `f_categories`;
CREATE TABLE `f_categories` (
  `cat_id` smallint(5) NOT NULL auto_increment,
  `cat_name` varchar(255) NOT NULL default 'New Category',
  `cat_disp_position` int(10) NOT NULL default '0',
  PRIMARY KEY  (`cat_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `f_forums`
--

DROP TABLE IF EXISTS `f_forums`;
CREATE TABLE `f_forums` (
  `forum_id` smallint(5) unsigned NOT NULL auto_increment,
  `forum_name` varchar(255) NOT NULL default 'New forum',
  `forum_desc` varchar(255) default NULL,
  `redirect_url` varchar(200) default NULL,
  `moderators` varchar(255) default NULL,
  `num_topics` mediumint(8) unsigned NOT NULL default '0',
  `num_posts` mediumint(8) unsigned NOT NULL default '0',
  `last_topic_id` int(10) unsigned default NULL,
  `disp_position` smallint(6) NOT NULL default '0',
  `quick_reply` tinyint(1) NOT NULL default '0',
  `closed` tinyint(1) NOT NULL default '0',
  `hidden` tinyint(1) NOT NULL default '0',
  `cat_id` smallint(5) unsigned NOT NULL default '0',
  PRIMARY KEY  (`forum_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `f_markread`
--

DROP TABLE IF EXISTS `f_markread`;
CREATE TABLE `f_markread` (
  `marker_member_id` int(8) unsigned NOT NULL default '0',
  `marker_forum_id` int(10) unsigned NOT NULL default '0',
  `marker_last_update` int(10) unsigned NOT NULL default '0',
  `marker_unread` smallint(5) NOT NULL default '0',
  `marker_topics_read` text NOT NULL,
  `marker_last_cleared` int(10) unsigned NOT NULL default '0',
  UNIQUE KEY `marker_forum_id` (`marker_forum_id`,`marker_member_id`),
  KEY `marker_member_id` (`marker_member_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `f_posts`
--

DROP TABLE IF EXISTS `f_posts`;
CREATE TABLE `f_posts` (
  `post_id` int(10) unsigned NOT NULL auto_increment,
  `poster` varchar(12) NOT NULL,
  `poster_id` int(8) unsigned NOT NULL default '0',
  `poster_ip` varchar(15) default NULL,
  `poster_character_id` int(11) NOT NULL,
  `message` text NOT NULL,
  `posted` int(10) unsigned NOT NULL default '0',
  `edited` int(10) unsigned default NULL,
  `edited_by` varchar(30) default NULL,
  `topic_id` int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (`post_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `f_topics`
--

DROP TABLE IF EXISTS `f_topics`;
CREATE TABLE `f_topics` (
  `topic_id` int(10) unsigned NOT NULL auto_increment,
  `topic_poster` varchar(12) NOT NULL,
  `topic_poster_id` int(8) unsigned NOT NULL,
  `topic_name` varchar(255) NOT NULL,
  `topic_posted` int(10) unsigned NOT NULL default '0',
  `last_post` int(10) unsigned NOT NULL default '0',
  `last_post_id` int(10) unsigned NOT NULL default '0',
  `last_poster` varchar(200) default NULL,
  `num_views` mediumint(8) unsigned NOT NULL default '0',
  `num_replies` mediumint(8) unsigned NOT NULL default '1',
  `closed` tinyint(1) NOT NULL default '0',
  `sticky` tinyint(1) NOT NULL default '0',
  `redirect_url` varchar(200) default NULL,
  `forum_id` int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (`topic_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `gallery`
--

DROP TABLE IF EXISTS `gallery`;
CREATE TABLE `gallery` (
  `id` int(3) NOT NULL auto_increment,
  `img` text NOT NULL,
  `comment` text NOT NULL,
  `autor` text NOT NULL,
  `date` date NOT NULL,
  `cat` varchar(255) NOT NULL,
  UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=19 DEFAULT CHARSET=cp1251 ROW_FORMAT=DYNAMIC;

--
-- Table structure for table `gallery_ssotd`
--

DROP TABLE IF EXISTS `gallery_ssotd`;
CREATE TABLE `gallery_ssotd` (
`image` VARCHAR(50) NOT NULL,
`date` VARCHAR(8) NOT NULL
) ENGINE = MYISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `online`
--

DROP TABLE IF EXISTS `online`;
CREATE TABLE `online` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `user_id` int(10) NOT NULL default '0',
  `user_name` varchar(200) NOT NULL default 'Guest',
  `user_ip` varchar(15) NOT NULL default '0.0.0.0',
  `logged` int(10) NOT NULL default '0',
  `currenturl` varchar(255) NOT NULL default './',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `paypal_payment_info`
--

DROP TABLE IF EXISTS `paypal_payment_info`;
CREATE TABLE `paypal_payment_info` (
  `firstname` varchar(100) NOT NULL default '',
  `lastname` varchar(100) NOT NULL default '',
  `buyer_email` varchar(100) NOT NULL default '',
  `street` varchar(100) NOT NULL default '',
  `city` varchar(50) NOT NULL default '',
  `state` char(3) NOT NULL default '',
  `zipcode` varchar(11) NOT NULL default '',
  `memo` varchar(255) default NULL,
  `itemname` varchar(255) default NULL,
  `itemnumber` varchar(50) default NULL,
  `os0` varchar(20) default NULL,
  `on0` varchar(50) default NULL,
  `os1` varchar(20) default NULL,
  `on1` varchar(50) default NULL,
  `quantity` char(3) default NULL,
  `paymentdate` varchar(50) NOT NULL default '',
  `paymenttype` varchar(10) NOT NULL default '',
  `txnid` varchar(30) NOT NULL default '',
  `mc_gross` varchar(6) NOT NULL default '',
  `mc_fee` varchar(5) NOT NULL default '',
  `paymentstatus` varchar(15) NOT NULL default '',
  `pendingreason` varchar(10) default NULL,
  `txntype` varchar(10) NOT NULL default '',
  `tax` varchar(10) default NULL,
  `mc_currency` varchar(5) NOT NULL default '',
  `reasoncode` varchar(20) NOT NULL default '',
  `custom` varchar(255) NOT NULL default '',
  `country` varchar(20) NOT NULL default '',
  `datecreation` date NOT NULL default '0000-00-00',
  `item_given` varchar(255) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Table structure for table `pms`
--

DROP TABLE IF EXISTS `pms`;
CREATE TABLE `pms` (
  `id` int(8) unsigned NOT NULL auto_increment,
  `owner_id` int(8) unsigned NOT NULL default '0',
  `subject` varchar(255) NOT NULL,
  `message` text,
  `sender_id` int(8) unsigned NOT NULL default '0',
  `posted` int(10) unsigned NOT NULL default '0',
  `sender_ip` varchar(15) default '0.0.0.0',
  `showed` tinyint(1) default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `site_regkeys`
--

DROP TABLE IF EXISTS `site_regkeys`;
CREATE TABLE `site_regkeys` (
  `id` int(11) NOT NULL auto_increment,
  `key` varchar(40) NOT NULL,
  `used` tinyint(1) default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `world_entrys`
--

DROP TABLE IF EXISTS `world_entrys`;
CREATE TABLE `world_entrys` (
  `id` int(11) NOT NULL auto_increment,
  `db_name` varchar(255) collate latin1_general_ci NOT NULL,
  `last_inc` int(20) NOT NULL,
  `last_id` int(20) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Dumping data for table `account_extend`
--

INSERT INTO `account_extend` (`account_id`) SELECT account.id FROM account;

--
-- Dumping data for table `account_groups`
--

INSERT INTO `account_groups` (`g_id`, `g_title`, `g_prefix`, `g_is_admin`, `g_is_supadmin`, `g_use_search`, `g_view_profile`, `g_post_new_topics`, `g_reply_other_topics`, `g_use_attach`, `g_edit_own_posts`, `g_delete_own_posts`, `g_delete_own_topics`, `g_forum_moderate`, `g_use_pm`, `g_gal_view`, `g_gal_upload`, `g_gal_download`, `g_gal_moderate`, `g_gal_balanceon`) VALUES
(1,'Guests',NULL,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0),
(2,'Members',NULL,0,0,1,1,1,1,1,1,1,0,0,1,1,1,1,0,1),
(3,'Administrators','+',1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0),
(4,'Root Admins','&#165;',1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0),
(5,'Banned',NULL,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);

--
-- Dumping data for table `gallery`
--

INSERT INTO `gallery` (`id`, `img`, `comment`, `autor`, `date`, `cat`) VALUES
(1,'Mangosweb_wall.jpg','Test Wallpaper','MangosWeb','0000-00-00','wallpaper'),
(2,'Mangosweb_scr.jpg','Test Screenshot','MangosWeb','0000-00-00','screenshot');

--
-- Dumping data for table `gallery_ssotd`
--

INSERT INTO `gallery_ssotd` (`image`, `date`) VALUES
('asdf', 'asdf');

--
-- Dumping data for table `world_entrys`
--

INSERT INTO `world_entrys` (`id`, `db_name`, `last_inc`, `last_id`) VALUES
(1,'character',0,0),
(2,'item_instance',0,0),
(3,'mail',0,0);

--
-- Add dbinfo to realmlist table
-- Very important that this is in the end, along with ADD ALTERS. Because if
-- file gets applied again, it gets an error here.
--

ALTER TABLE `realmlist` ADD `dbinfo` VARCHAR( 355 ) NOT NULL default 'username;password;3306;127.0.0.1;DBWorld;DBCharacter' COMMENT 'Database info to THIS row';
